package com.yanqu.road.entity.enums.activity.newyearbag;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public enum eNewYearBagType {

    Ingots(1, "元宝"),
    TongBao(2, "通宝"),
    XianJin(3, "现金"),
    Skin(4, "皮肤"),
    Normal(5, "普通道具"),
    ShiWu(6, "实物"),
    ;

    private static final Map<Integer, eNewYearBagType> cache = new ConcurrentHashMap<>();

    static {
        for (eNewYearBagType type : eNewYearBagType.values()) {
            cache.put(type.getType(), type);
        }
    }

    public static eNewYearBagType getTypeByInt(int type) {
        return cache.get(type);
    }

    eNewYearBagType(int type, String name) {
        this.type = type;
        this.name = name;
    }

    private int type;
    private String name;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
